<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace app\Common\model;

class LongbingCardFromId extends \app\BaseModel
{
    protected $name = "longbing_card_form_id";
    public function getFromId($filter)
    {
        $result = $this->where($filter)->order("id asc")->find();
        if(!empty($result)) {
            $result = $result->toArray();
        }
        return $result;
    }
    public function autoDelFromId()
    {
        $filter = [["create_time", "<", mktime(0, 0, 0, date("m"), date("d") - 6, date("Y"))]];
        $result = $this->delFromId($filter);
        return !empty($result);
    }
    public function delFromId($filter)
    {
        $result = $this->destoryFromId($filter);
        return !empty($result);
    }
    public function destoryFromId($filter)
    {
        $result = $this->where($filter)->delete();
        return !empty($result);
    }
}

?>